<%--
  Author hiberk
  Date: 2017/6/29
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/inc/tag.jsp" %>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title>分销商详情页</title>
    
    <c:import url="/inc/manager/link.jsp"></c:import>
    <script type="text/javascript" language="javascript" src="${_PATH}/js/datepickerCN.js"></script>
    <script type="text/javascript" language="javascript" src="${_PATH}/public/assets/global/plugins/jquery-validation/js/jquery.validate.min.js"></script>
    <script type="text/javascript" language="javascript" src="${_PATH}/js/jquery.validate.messages_cn.js"></script>
    <script type="text/javascript" language="javascript" src="${_PATH}/js/distributor/withdraw.validate.js"></script>
    <script type="text/javascript" language="javascript" src="${_PATH}/js/distributor/card.js"></script>
    <script type="text/javascript" language="JavaScript" src="${_PATH}/js/distributor/withdraw.js"></script>
</head>
<style type="text/css">
    .error {
        color: red;
    }
    .form-control-feedback {
        margin-top: 10px;
    }
</style>
<body class="page-header-fixed page-quick-sidebar-over-content page-sidebar-closed-hide-logo page-container-bg-solid">
<c:import url="/inc/manager/head.jsp"></c:import>
<div class="page-container">
    <div class="page-sidebar-wrapper">
        <c:import url="/inc/manager/left.jsp"></c:import>
    </div>
    <div class="page-content-wrapper">
        <div class="page-content">
            <!-- BEGIN PAGE HEADER-->
            <h3 class="page-title">
                分销商
                <small>提现</small>
            </h3>
            <div class="row">
                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="dashboard-stat blue-madison">
                        <div class="visual">
                            <i class="fa fa-comments"></i>
                        </div>
                        <div class="details">
                            <div class="number">

                                ￥<fmt:formatNumber type="number" value="${accountTotal==null?0:accountTotal}" maxFractionDigits="2"></fmt:formatNumber>
                            </div>
                            <div class="desc">
                                成交总金额
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="dashboard-stat red-intense">
                        <div class="visual">
                            <i class="fa fa-bar-chart-o"></i>
                        </div>
                        <div class="details">
                            <div class="number">
                                ￥<fmt:formatNumber type="number" value="${tradeTotal==null?0:tradeTotal}" maxFractionDigits="2"></fmt:formatNumber>
                            </div>
                            <div class="desc">
                                账面总金额
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="dashboard-stat green-haze">
                        <div class="visual">
                            <i class="fa fa-shopping-cart"></i>
                        </div>
                        <div class="details">
                            <div class="number">



                                ￥
                                <fmt:formatNumber type="number" value="${accountTotal*distributor.proportion}" maxFractionDigits="2"></fmt:formatNumber>
                                                            </div>
                            <div class="desc">
                                佣金总金额
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="dashboard-stat purple-plum">
                        <div class="visual">
                            <i class="fa fa-globe"></i>
                        </div>
                        <div class="details">

                            <div class="number">
                                ￥
                                <span id="totalCommission">
                                    <fmt:formatNumber type="number" value="${accountTotal*distributor.proportion - distributor.commissionWithdraw}" maxFractionDigits="2"></fmt:formatNumber>
                                </span>
                            </div>
                            <div class="desc">
                                可提现佣金
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <button class="btn btn-primary margin-bottom-15" data-toggle="modal" data-target="" id="withdrawBtn">资金提现</button>
            <div id="myModal" class="modal fade in" style="display: none;" aria-hidden="false">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button aria-label="Close" data-dismiss="modal" class="close" type="button"><span aria-hidden="true">×</span></button>
                            <h4 class="modal-title">基本信息</h4>
                        </div>
                        <form class="form" role="form" id="formValue">
                            <div class="modal-body">
                                <input type="hidden" id="id-modal" value="4">
                                <div class="form-group has-feedback">
                                    <label>申请人</label>
                                    <input type="text"  id="account-modal" name="person" placeholder="申请人" class="form-control" maxlength="30" value="${distributor.nickname}">
                                    <span class="glyphicon glyphicon-user form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>联系电话</label>
                                    <input type="text"  id="phone-modal" name="phone" placeholder="联系电话" class="form-control" maxlength="11" value="${distributor.phone}">
                                    <span class="glyphicon glyphicon-earphone form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>联系地址</label>
                                    <input type="text"  id="address-modal" name="contactAddress" placeholder="联系地址" class="form-control" maxlength="50" value="${distributor.address}">
                                    <span class="glyphicon glyphicon-home form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>姓名</label>
                                    <input type="text"  id="payee-modal" name="realName" placeholder="姓名" class="form-control" maxlength="10" value="${distributor.username}">
                                    <span class="glyphicon glyphicon-book form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>身份证</label>
                                    <input type="text"  id="identity-modal" name="idCard" placeholder="身份证" class="form-control" maxlength="20" value="${distributor.identity}">
                                    <span class="glyphicon glyphicon-barcode form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>银行账号</label>
                                    <input type="text"  id="bank_num-modal" name="bankCard" placeholder="银行账号" class="form-control" maxlength="21" value="${distributor.bankAccount}">
                                    <span class="glyphicon glyphicon-credit-card form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>开户行</label>
                                    <input type="text"  id="bank_addr-modal" name="bankAddress" placeholder="开户行" class="form-control" maxlength="30" value="${distributor.bankAddress}">
                                    <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>申请金额</label>
                                    <input type="text"  id="amount-modal" name="money" placeholder="申请金额" class="form-control" maxlength="10">
                                    <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
                                </div>
                                <div class="form-group has-feedback">
                                    <label>备注</label>
                                    <textarea id="note-modal" name="remark" placeholder="备注" class="form-control" maxlength="200"></textarea>
                                    <span class="glyphicon glyphicon-calendar form-control-feedback"></span>
                                </div>
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button data-dismiss="modal" class="btn btn-default" type="button">关闭</button>
                            <button onclick="edit_order()" class="btn btn-primary" type="button">保存</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div>
            <!-- END PAGE HEADER-->
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet green box">
                        <div class="portlet-title">
                            <div class="caption">
                                <i class="fa fa-cogs"></i>详情列表
                            </div>
                            <div class="tools">
                                <a class="collapse" href="javascript:;" data-original-title="" title="">
                                </a>
                                <a class="config" data-toggle="modal" href="#portlet-config" data-original-title=""
                                   title="">
                                </a>
                                <a class="reload" href="javascript:;" data-original-title="" title="">
                                </a>
                                <a class="remove" href="javascript:;" data-original-title="" title="">
                                </a>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <form class="form form-inline" role="form" id="_listForm"
                                  onkeydown="if(event.keyCode==13)return false;">
                                <div class="form-group">
                                    <div class="input-prepend input-group">
                                        <span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span>
                                        <input type="text" value="" readonly="" class="form-control input-medium date-picker" placeholder="日期起" name="start_time" style="width: 200px;" id="start">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="input-prepend input-group">
                                        <span class="add-on input-group-addon"><i class="glyphicon glyphicon-calendar fa fa-calendar"></i></span>
                                        <input type="text" value="" readonly="" class="form-control input-medium date-picker" placeholder="日期止" name="end_time" style="width: 200px;" id="last">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <button class="btn btn-primary" type="button" id="queryBtn">搜索</button>
                                </div>
                                <div class="form-group">
                                    <button class="btn btn-default" type="button" id="clear">清空</button>
                                </div>
                                <div id="_dataList">
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- END CONTENT -->
    </div>
</div>
<c:import url="/inc/manager/foot.jsp"></c:import>
</body>
</html>
